package com.game.server.web;

import java.io.File;
import java.io.IOException;

import org.jdom2.Document;
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.input.SAXBuilder;

import com.game.server.IConfig;


public class WebConfig implements IConfig {



	public static String URL = "http://127.0.0.1:2001/WebServer.ws";




	@Override
	public void init(String path) throws JDOMException, IOException {
		SAXBuilder builder = new SAXBuilder();
		Document doc = builder.build(new File(path));
		Element foo = doc.getRootElement();
		WebConfig.URL = foo.getChild("url").getText();
	}

	@Override
	public void finish() throws ClassNotFoundException, InstantiationException,
			IllegalAccessException {

	}

}